<template>
  <div id="work-out-schedule-teaching">
    <el-row>
      <el-col :span="4">
        <div class="border-all">
          <div class="query-item">
            <div class="text">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期：</div>
            <el-select
              class="select"
              v-model="semester"
              placeholder="请选择"
              size="mini"
              clearable
            >
              <el-option
                v-for="(item, index) in semesterList"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </div>
          <div class="query-item">
            <div class="text">年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;级：</div>
            <el-select
              class="select"
              v-model="grade"
              placeholder="请选择"
              size="mini"
              clearable
            >
              <el-option
                v-for="(item, index) in gradeList"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </div>
          <div class="query-item">
            <div class="text">专业班次：</div>
            <el-tooltip v-if="majorName != ''" class="item" effect="dark" :content="majorName" placement="right">
              <div @click="selectZYBC()" class="zybc-select" style="overflow: hidden;">{{majorName}}</div>
            </el-tooltip>
            <div v-else @click="selectZYBC()" class="zybc-select">{{majorName}}</div>
          </div>
          <div class="query-text">专业班次人数：{{ratedNumber}}人</div>
          <div class="query-text">固定教学场地：{{classZYBCName}}</div>
          <div class="search-button" style="margin: 0 30px 10px 40px;display:inline-flex" @click="queryPaikeListClass">
            <img src="../../../../assets/assessment/icon-search.png" alt="" />
            <span>查询</span>
          </div>
          <div class="search-button" style="position: absolute;display:inline-flex" @click="resetAll">
            <!-- <img src="../../../../assets/assessment/icon-search.png" alt="" /> -->
            <span>重置</span>
          </div>
        </div>

        <div>
          <div class="assessment-container" style="width: calc(100% - 20px);">
            <div class="table-container" style="border: 0">
              <el-table
                :data="classTable"
                border
                class="table-data"
                row-class-name="row-class"
                cell-class-name="cell-class"
                header-row-class-name="header-row-class"
                header-cell-class-name="header-cell-class"
                style="height: 435px; overflow-y: auto"
                @row-click="rowClick"
                 highlight-current-row
              >
                <el-table-column label="课程列表" align="center">
                  <template slot-scope="scope">
                    <div class="flex-margin">
                      <div style="margin-right: 5px">
                        <i
                          class="el-icon-lock lock"
                          v-if="scope.row['status'] == '发布'"
                        ></i>
                        <i class="el-icon-unlock un-lock" v-else></i>
                      </div>
                      <div>
                        <div>
                          <span>{{ scope.row["coursename"] }}</span>
                        </div>
                        <div>
                          <span class="short">[{{ scope.row["shortname"] }}]</span>
                        </div>
                      </div>
                    </div>
                  </template>
                </el-table-column>
                <el-table-column label="修改简称" align="center" width="80px">
                  <template slot-scope="scope">
                    <el-button @click="editRowInfo(scope.row)" type="success" plain icon="el-icon-edit"></el-button>
                  </template>
                </el-table-column>
              </el-table>
            </div>
          </div>
        </div>

        <div class="border-all">
          <div class="flex-margin">排课时间设置：</div>
          <div class="flex-margin">
            <div>从</div>
            <el-date-picker
            style="width: 180px;margin-left: 10px;"
              v-model="startClassDate"
              type="date"
              value-format="yyyy-MM-dd"
              placeholder="选择日期"
            >
            </el-date-picker>
          </div>
          <div class="flex-margin">
            <div>到</div>
            <el-date-picker
            style="width: 180px;margin-left: 10px;"
              v-model="endClassDate"
              type="date"
              value-format="yyyy-MM-dd"
              placeholder="选择日期"
            >
            </el-date-picker>
          </div>
          <div class="flex-margin">
            <el-checkbox v-model="showWeek">显示周末</el-checkbox>
          </div>
          <div class="search-button" style="margin: 0 20px 0 40px;display:inline-flex" @click="applicationClass">
            <span>应用</span>
          </div>
          <div class="search-button" style="position: absolute;display:inline-flex" @click="resetAllTime">
            <!-- <img src="../../../../assets/assessment/icon-search.png" alt="" /> -->
            <span>重置</span>
          </div>

          <div style="justify-content: space-around" class="flex-margin">
            <el-button type="danger" size="mini" icon="el-icon-search" plain @click="toViewZYBCClass">预览专业班次课表</el-button>
          </div>
        </div>
      </el-col>
      <el-col :span="20" style="border-left: 1px solid #004ca7">
        <div class="manual-entry-container">
          <div>
            <ul>
              <li>
                <span class="active">课程名称</span>
                <span v-if="classSelectRow.coursename != '' && classSelectRow.coursename != null">{{ classSelectRow.coursename }}</span><span v-else>--</span>
                <span class="active">教学课主讲</span>
                <span v-if="classSelectRow.teachtask != '' && classSelectRow.teachtask != null">{{ classSelectRow.teachtask }}</span><span v-else>--</span>
                <span class="active">课程负责人<span>*</span></span>
                <span v-if="classSelectRow.coursecharge != '' && classSelectRow.coursecharge != null">{{ classSelectRow.coursecharge }}</span><span v-else>--</span>
              </li>
              <li>
                <span class="active">计划学时</span>
                <span v-if="classSelectRow.planclasshours != '' && classSelectRow.planclasshours != null">{{ classSelectRow.planclasshours }}</span><span v-else>--</span>
                <span class="active">已排学时</span>
                <span v-if="classSelectRow.classhours != '' && classSelectRow.classhours != null">{{ classSelectRow.classhours }}</span><span v-else>--</span>
                <span class="active">上课人数</span>
                <span v-if="classSelectRow.rs != '' && classSelectRow.rs != null">{{ classSelectRow.rs }}</span><span v-else>--</span>
              </li>
              <li>
                <span class="active">合班上课专业班次</span>
                <span v-if="classSelectRow.jointClass != '' && classSelectRow.jointClass != null">{{ classSelectRow.jointClass }}</span><span v-else>--</span>
              </li>
            </ul>
          </div>

          <div>
            <div>
              <span>课表模式：</span>
              <el-select
                class="select"
                v-model="kbms"
                placeholder="请选择"
                size="mini"
                clearable
              >
                <el-option
                  v-for="(item, index) in kbmsList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div>
            <div class="paike-tip">
               <el-popover
                placement="bottom"
                width="200"
                trigger="hover"
                content="不能排课日期">
                <div class="red-cirle" slot="reference">&nbsp;</div>
              </el-popover>
               <el-popover
                placement="bottom"
                width="200"
                trigger="hover"
                content="排课时间冲突(不可排课)">
                <div class="green-block" slot="reference">&nbsp;</div>
              </el-popover>
              <el-popover
                placement="bottom"
                width="200"
                trigger="hover"
                content="教员冲突(可修改教员进行排课)">
                <div class="blue-block" slot="reference">&nbsp;</div>
              </el-popover>
              <el-popover
                placement="bottom"
                width="200"
                trigger="hover"
                content="合班冲突(不可排课)">
                <div class="red-block" slot="reference">&nbsp;</div>
              </el-popover>

            </div>
            <div style="display: flex">
              <el-button type="warning" size="mini" plain @click="selectAllData">全选</el-button>
              <el-button type="primary" size="mini" plain @click="reserveAllData">反选</el-button>
              <el-button type="danger" size="mini" plain @click="removeSelectClass">删除选中课表</el-button>
              <el-button type="primary" size="mini" plain @click="editMoreTimetable()">编辑选中课表</el-button>
            </div>
          </div>

          <div>
            <div class="calendar-title">
              <div class="calendar-title-top">
                <div class="top">月份</div>
                <div class="top">周次</div>
                <div class="top wth-660" v-for="(item, index) in weekTextList" :key="index">
                  <div class="week">
                    <div class="border-bottom">{{item}}</div>
                    <div>
                      <div>日期</div>
                      <div>1</div>
                      <div>2</div>
                      <div>3</div>
                      <div>4</div>
                      <div>5</div>
                      <div>6</div>
                      <div>7</div>
                      <div>8</div>
                      <div>9</div>
                      <div>10</div>
                    </div>
                  </div>
                </div>
              </div>
             <div class="calendar-content" v-for="(item, index) in calendarData" :key="index">
                  <div class="month">
                    {{item.courseMonth}}
                  </div>
                  <div class="week-times">
                    <div class="week-time-item" v-for="(week,weekIndex) in item.ycList" :key="'week1'+index+weekIndex">
                    {{week.courseWeeks}}
                    </div>
                  </div>
                  <div class="days">
                    <div v-for="(weeks,weekIndex1) in item.ycList" :key="'week1_copy_'+index+weekIndex1" style="display: flex;border-bottom: 1px solid rgba(0, 76, 167, 0.4);">
                      <div class="day-times" v-for="(week,weekIndex2) in weeks.zcList" :key="'week2'+index+weekIndex2" >
                        <div v-if="weekIndex2 == 0 && week.courseWeek=='星期二'" style="display: flex">
                           <div class="empty-cell">&nbsp;</div>
                        </div>
                        <div v-else-if="weekIndex2 == 0 && week.courseWeek=='星期三'" style="display: flex">
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                        </div>
                        <div v-else-if="weekIndex2 == 0 && week.courseWeek=='星期四'" style="display: flex">
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                        </div>
                        <div v-else-if="weekIndex2 == 0 && week.courseWeek=='星期五'" style="display: flex">
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                        </div>
                        <div v-else-if="weekIndex2 == 0 && week.courseWeek=='星期六'" style="display: flex">
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                        </div>
                        <div v-else-if="weekIndex2 == 0 && week.courseWeek=='星期日'" style="display: flex">
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                            <div class="empty-cell">&nbsp;</div>
                        </div>
                        <div class="day-time-item">{{week.date}}</div>
                          <div @click="clickInfo(day)" :class="day.click?'class-active':''" class="day-time-item" :style="{width: (60 * parseInt(day.col)) + 'px'}" v-for="(day, dayIndex) in week.jcList" :key="'day1'+index+weekIndex+dayIndex">
                            <div class="allow" v-if="!day.bkpk && !day.pkct && day.ctjyIds.length== 0 && day.hbskIds.length == 0 && day.courseno ==''" @dblclick="handleClickWorkOutSchedule(day.courseJc, weeks.courseWeeks, day)"></div>
                            <div v-if="day.courseno!='' && kbms=='简单模式' && !day.bkpk" style="overflow: hidden;">
                              <el-tooltip class="item" effect="dark" :content="day.courseName" placement="bottom-start">
                                <span class="undeLine" @click="editTimetable(day)">{{day.courseName}}</span>
                              </el-tooltip>
                            </div>
                            <div v-if="day.courseno!='' && kbms=='复杂模式' && !day.bkpk" style="overflow: hidden;">
                              <el-tooltip class="item" effect="dark" :content="day.courseName + '/' + day.coursePlaceStr + '/' + day.teaherTaskStr + '/' + day.assistantStr" placement="bottom-start">
                                <span class="undeLine" @click="editTimetable(day)">{{day.courseName}}/{{day.coursePlaceStr}}/{{day.teaherTaskStr}}/{{day.assistantStr}}</span>
                              </el-tooltip>
                            </div>
                            <div class="red-cirle" v-if="day.bkpk"></div>
                            <div class="green-block" v-if="day.pkct"></div>
                            <div class="blue-block" v-if="day.ctjyIds.length > 0" @click="handleReplaceTeacher( day.courseName, day.ctjyIds)"></div>
                            <div class="red-block" v-if="day.hbskIds.length > 0" @click="paikeCTTeacher(day.courseJc ,day.hbskIds)"></div>
                          </div>
                      </div>
                    </div>
                  </div>
              </div>
            </div>
          </div>
          <div></div>
        </div>
      </el-col>
    </el-row>

    <el-dialog
      :title="teacherType=='main'? '选择教员':'选择助教'"
      :visible.sync="showPeopleDialogly"
      width="1500px"
      class="xuanzejiaoyuan"
    >
      <div>
        <el-row>
          <el-col :span="4" class="tree" style="padding: 20px;">
            <el-tree
              default-expand-all
              :data="jyData"
              :props="defaultProps"
              @node-click="handleTeacherNodeClick"
              style="color: #004ca7;font-weight: bold;background: #f0f2f5;"
            ></el-tree>
          </el-col>
          <el-col :span="20" style="border-left: 1px solid #004ca7">
            <el-row style="margin-right: 50px">
              <el-col :span="11">
                <div
                  class="wrapper-container"
                  style="display: flex; flex-direction: column"
                >
                  <div class="search-container">
                    <div class="search-container-left" style="display: flex;align-items: center;">
                      <div
                        class="search-container-item query-btn"
                        v-for="(select, index) in selectList"
                        :key="index"
                      >
                        <div v-if="select.type === 'btn'" class="box">
                          <span class="demonstration" v-show="select.name">{{
                            select.name
                          }}</span>
                          <el-input
                            v-model="select.val"
                            placeholder="请输入内容"
                          ></el-input>
                        </div>
                      </div>

                      <div class="search-button" style="margin-top: -5px;">
                        <img
                          src="../../../../assets/assessment/icon-search.png"
                          alt=""
                        />
                        <span @click="queryTeacherList">查询</span>
                      </div>
                    </div>
                  </div>

                  <div class="assessment-container" style="width: calc(100% - 20px);">
                    <div class="table-container">
                      <el-table
                        :data="tableData"
                        border
                        class="table-data"
                        row-class-name="row-class"
                        cell-class-name="cell-class"
                        header-row-class-name="header-row-class"
                        header-cell-class-name="header-cell-class"
                        style="height: 580px; overflow-y: auto"
                        @selection-change="handleSelectionChange"
                      >
                        <el-table-column
                          label="可选的人员列表"
                          align="center"
                        >
                          <el-table-column
                            align="center"
                            type="selection"
                            width="80"
                          >
                          </el-table-column>
                          <el-table-column
                            prop="xm"
                            label="人员"
                            align="center"
                          >
                          <template slot-scope="scoped">{{scoped.row['xm']}}({{scoped.row['gzbm']}})</template>
                          </el-table-column>
                        </el-table-column>
                      </el-table>
                    </div>
                  </div>
                </div>
              </el-col>
              <el-col :span="2">
                <div class="arrow-right-postion">
                  <div class="btn" @click="transferData">
                    <i class="el-icon-arrow-right"></i>
                  </div>
                </div>
              </el-col>
              <el-col :span="11">
                <div
                  class="wrapper-container"
                  style="
                    display: flex;
                    flex-direction: column;
                    margin-top: 75px;
                  "
                >
                  <div class="assessment-container" style="width: calc(100% - 20px);">
                    <div class="table-container">
                      <el-table
                        :data="tableData2"
                        border
                        class="table-data"
                        row-class-name="row-class"
                        cell-class-name="cell-class"
                        header-row-class-name="header-row-class"
                        header-cell-class-name="header-cell-class"
                        style="height: 580px; overflow-y: auto"
                      >
                        <el-table-column
                          align="center"
                          :render-header="renderHeader"
                        >
                          <el-table-column
                            prop="xm"
                            label="人员"
                            align="center"
                          >
                          <template slot-scope="scoped">{{scoped.row['xm']}}({{scoped.row['gzbm']}})</template>
                          </el-table-column>
                          <el-table-column
                            align="center"
                            label="操作"
                            width="160"
                          >
                            <template slot-scope="scope">
                              <div
                                style="
                                  display: flex;
                                  padding-left: 10px;
                                  justify-content: space-around;
                                "
                              >
                              <el-button type="danger" @click="deleteRow(scope.row, scope.$index)" size="mini" plain icon="el-icon-delete">删除</el-button>
                              </div>
                            </template>
                          </el-table-column>
                        </el-table-column>
                      </el-table>
                    </div>
                  </div>
                </div>
              </el-col>
            </el-row>
          </el-col>
        </el-row>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="success" plain @click="submitSelectPeople()">确 定</el-button>
      </span>
    </el-dialog>

    <el-dialog
      title="修改简称"
      :visible.sync="editShorterNameDialog"
      width="700px"
      class="xzjy"
    >
      <div style="margin: 40px;">
        <div class="manual-entry-container">
          <div>
            <ul>
              <li>
                <span class="active" style="width: 180px;padding-left: 50px;
    text-align: left;">教学班名称</span>
                <span style="width: 200px;">{{ editShorter.classRoom }}</span>
              </li>
              <li>
                <span class="active"  style="width: 180px;padding-left: 50px;
    text-align: left;">课程全称</span>
                <span style="width: 200px;">{{ editShorter.coursename }}</span>
              </li>
              <li>
                <span class="active" style="width: 180px;padding-left: 50px;
    text-align: left;">原课程简称</span>
                <span style="width: 200px;">{{ editShorter.shortname }}</span>
              </li>
              <li>
                <span class="active" style="width: 180px;padding-left: 50px;
    text-align: left;">现课程简称<span>*</span></span>
                <span style="width: 200px;" class="xgjc"><el-input v-model="shortNameNew"></el-input></span>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div class="dialog-footer">
        <el-button type="success" plain @click="saveShorterNameData()">保存</el-button>
        <el-button type="warning" plain @click="editShorterNameDialog = false">取消</el-button>
      </div>
    </el-dialog>


     <el-dialog
      :title="paikeTitle"
      :visible.sync="workOutScheduleDialog"
      width="1150px"
      class="paike"
    >
      <div style="margin: 40px;">
        <div class="manual-entry-container">
          <div>
            <ul>
              <li>
                <span class="active">教学场地</span>
                <span style="width: 600px;">
                  <div class="dialog-input">
                    <el-input v-model="classRoom" class="dialog-input"></el-input>
                    <i class="el-icon-edit edit-icon" @click="selectClassRoomDialog = true"></i>
                    <el-button type="success" @click="tjjxcdInfo" style="margin-left:20px" size="mini" plain>推荐场地</el-button>
                    <i class="el-icon-delete del-icon" @click="deletedPlace()"></i>
                  </div>
                </span>
              </li>
              <li>
                <span class="active">上课教员(可多选)</span>
                <span style="width: 750px;">
                  <div class="dialog-input">
                    <el-input v-model="classTeacher" class="dialog-input"></el-input>
                    <i class="el-icon-edit edit-icon" @click="editInfo()"></i>
                    <i class="el-icon-delete del-icon" @click="deleteJy()"></i>
                  </div>
                </span>
              </li>
              <li>
                <span class="active">助教(可多选)</span>
                <span style="width: 750px;">
                  <div class="dialog-input">
                    <el-input v-model="assistant"></el-input>
                    <i class="el-icon-edit edit-icon"  @click="editZhuJiaoInfo()"></i>
                    <i class="el-icon-delete del-icon" @click="deleteZy()"></i>
                  </div>
                </span>
              </li>
              <li>
                <span class="active">课程负责人<span>*</span></span>
                <span>
                  <el-select
                    v-model="courseLeader"
                    placeholder="请选择"
                    size="mini"
                  >
                    <el-option
                      v-for="(item, index) in kcfzrList"
                      :key="item.id"
                      :label="item.xm"
                      :value="item.id"
                    >
                    </el-option>
                  </el-select>
                </span>
              </li>
              <li>
                <span class="active">星期</span>
                <span style="width: 750px;">
                   <el-checkbox-group v-model="scheduleWeekSelectList">
                    <el-checkbox label="星期一">星期一</el-checkbox>
                    <el-checkbox label="星期二">星期二</el-checkbox>
                    <el-checkbox label="星期三">星期三</el-checkbox>
                    <el-checkbox label="星期四">星期四</el-checkbox>
                    <el-checkbox label="星期五">星期五</el-checkbox>
                    <el-checkbox label="星期六">星期六</el-checkbox>
                    <el-checkbox label="星期日">星期日</el-checkbox>
                  </el-checkbox-group>
                </span>
              </li>
               <li>
                <span class="active">当前所选节次<span>*</span></span>
                <span style="width: 750px;">
                  <el-select
                    v-model="currentSection1"
                    placeholder="请选择"
                    size="mini"
                    style="width:100px"
                  >
                    <el-option
                      v-for="(item, index) in currentSectionList"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                  到
                  <el-select
                    v-model="currentSection2"
                    placeholder="请选择"
                    size="mini"
                    style="width:100px"
                  >
                    <el-option
                      v-for="(item, index) in currentSectionList"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                  节
                </span>
              </li>
              <li>
                <span class="active">当前所选时间点应用到<span>*</span></span>
                <span style="width: 750px;">
                  <el-select
                    v-model="currentWeek1"
                    placeholder="请选择"
                    size="mini"
                    style="width:100px"
                  >
                    <el-option
                      v-for="(item, index) in currentWeekList"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                  到
                  <el-select
                    v-model="currentWeek2"
                    placeholder="请选择"
                    size="mini"
                    style="width:100px"
                  >
                    <el-option
                      v-for="(item, index) in currentWeekList"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                  周
                </span>
              </li>
              <li>
                <span class="active fill">请在以下周次列表中选择不排课周次</span>
              </li>
              <li class="select-week-list">
                <div v-for="(item, index) in selectWeekList" :key="index" class="week-item">
                  <span class="checked"><el-checkbox v-model="item.checked" :disabled="item.disabled"></el-checkbox></span>
                  <span class="content">{{item.label}}</span>
                </div>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div class="dialog-footer">
        <el-button type="success" plain @click="submitClassInfo">保存</el-button>
        <el-button type="warning" plain @click="cancelClassInfo">取消</el-button>
      </div>
    </el-dialog>

    <el-dialog
      title="选择教学场地"
      :visible.sync="selectClassRoomDialog"
      width="1500px"
      class="xuanze_jxcd"
    >
     <select-class-room  :source="'dialog'" @savePlaceInfo="savePlaceInfo" @cancelPlaceInfo="cancelPlaceInfo"></select-class-room>
     <div style="height:40px"></div>
    </el-dialog>

    <el-dialog
      title="推荐场地"
      :visible.sync="selectTuiJianRoomDialog"
      width="1500px"
      class="xuanze_jxcd"
    >
    <recommended-site @savePlaceInfo="savePlaceInfo" @cancelPlaceInfo="cancelPlaceInfo"></recommended-site>
     <div style="height:40px"></div>
    </el-dialog>


    <el-dialog
      title="编辑选中课表"
      :visible.sync="editTimeTableDialog"
      width="850px"
      class="xzjy"
    >
      <div style="margin: 40px;">
        <div class="manual-entry-container">
          <div>
            <ul>
              <li>
                <span class="active" style="width: 300px;"><el-checkbox v-model="replace_jxcd" style="margin-right: 10px;"></el-checkbox>替换选中时间点的教学场地</span>
                <span style="width: 420px;">
                  <div class="dialog-input">
                    <!--<el-input v-model="classRoom" disabled></el-input>-->
                     <div class="copy-input"><span>{{classRoom}}</span></div>
                    <i class="el-icon-edit edit-icon"  @click="openJXCD()"></i>
                    <i class="el-icon-delete del-icon" @click="deletedJXCD()"></i>
                  </div>
                </span>
              </li>
              <li>
                <span class="active" style="width: 300px;"><el-checkbox v-model="replace_skjy" style="margin-right: 10px;"></el-checkbox>替换选中时间点的上课教员</span>
                <span style="width: 420px;">
                  <div class="dialog-input">
                    <div class="copy-input"><span v-for="item in selectSKJY">{{item.xm}}</span></div>
                    <!-- <el-input v-model="skjyMc"></el-input> -->
                    <i class="el-icon-edit edit-icon"  @click="editInfo()"></i>
                    <i class="el-icon-delete del-icon" @click="deletedSKJY()"></i>
                  </div>
                </span>
              </li>
              <li>
                <span class="active" style="width: 300px;"><el-checkbox v-model="replace_zy" style="margin-right: 10px;"></el-checkbox>替换选中时间点的助教(可多选)</span>
                <span style="width: 420px;">
                  <div class="dialog-input">
                    <div class="copy-input"><span v-for="item in selectZJ">{{item.xm}}</span></div>
                    <i class="el-icon-edit edit-icon"  @click="editZhuJiaoInfo()"></i>
                    <i class="el-icon-delete del-icon" @click="deletedZJ()"></i>
                  </div>
                </span>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div class="dialog-footer">
        <el-button type="success" size="mini" plain @click="saveEditSelectInfo()">保存</el-button>
        <el-button type="warning" size="mini" plain @click="cancelEditSelectInfo()">取消</el-button>
      </div>
    </el-dialog>

    <el-dialog
      title="提示"
      :visible.sync="replaceTeacherDialog"
      width="850px"
      class="tishi"
    >
    <div class="class-tip">此时间段{{ctTeacherInfo.yuanKC}}-{{ctTeacherInfo.teacher}}，与您排的{{ctTeacherInfo.ctKC}}-{{ctTeacherInfo.teacher}}有冲突，是否替换其他老师？</div>
      <div class="dialog-footer">
        <el-button type="success" size="mini" plain @click="replacePaikeTeacher()">确定</el-button>
        <el-button type="warning" size="mini" plain @click="replaceTeacherDialog = false">取消</el-button>
      </div>
    </el-dialog>

    <el-dialog
      title="提示"
      :visible.sync="dedletedClassTeacherDialog"
      width="450px"
      class="tishi"
    >
    <div class="class-tip">您确定删除当前选中信息吗</div>
      <div class="dialog-footer">
        <el-button type="success" size="mini" plain @click="submitDeletedBatch">确定</el-button>
        <el-button type="warning" size="mini" plain @click="dedletedClassTeacherDialog = false">取消</el-button>
      </div>
    </el-dialog>

    <el-dialog
      title="选择专业班次"
      :visible.sync="showAddMessageDialog"
      width="1300px"
      class="xzzybc"
    >
      <div>
        <el-row>
          <el-col :span="4">
            <el-tree
              default-expand-all
              :data="treeData"
              :props="defaultProps"
              @node-click="handleNodeClick"
              style="color: #004ca7; margin: 20px 40px;background: #f0f2f5;font-weight: bold;"
            ></el-tree>
          </el-col>
          <el-col :span="20" class="border-left">
            <div class="assessment-container" style="width: 100%;padding: 20px;">
              <div class="table-container" style="width: 100%;">
                <el-table
                  :data="majorTableData"
                  border
                  class="table-data"
                  row-class-name="row-class"
                  cell-class-name="cell-class"
                  header-row-class-name="header-row-class"
                  header-cell-class-name="header-cell-class"
                  style="height: 385px; overflow-y: auto"
                  @selection-change="handleZYBCSelectionChange"
                >
                  <el-table-column align="center" type="selection" width="80">
                  </el-table-column>
                  <el-table-column
                    prop="className"
                    label="专业班次"
                    align="center"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="alias"
                    label="别名"
                    align="center"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="studentTeam"
                    label="学员队"
                    width="130"
                    align="center"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="specialtyName"
                    label="专业"
                    align="center"
                  >
                  </el-table-column>
                  <el-table-column prop="year" label="年级" align="center">
                  </el-table-column>
                  <el-table-column
                    prop="campus"
                    label="所在校区"
                    align="center"
                  >
                  </el-table-column>
                  <el-table-column prop="ratedNumber" label="额定人数" align="center">
                  </el-table-column>
                </el-table>
              </div>
            </div>
            <div class="wrapper-container" style="width: calc(100% - 40px);margin: 0 auto;">
              <div class="bottom-block" style="display: block">
                <div class="text">当前共找到{{ total1 }}条记录,当前显示{{ startPage1 }}-{{ endPage1 }}条</div>
              </div>
              <div class="pagination-block">
                <el-pagination
                  prev-text="上一页"
                  next-text="下一页"
                  :page-size="pageSize1"
                  layout="prev, pager, next, jumper"
                  :total="total1"
                  @current-change="handleDialogCurrentChange"
                  :current-page="currentPage1"
                >
                </el-pagination>
              </div>
            </div>
            <div class="btn-caozuo">
              <el-button type="warning" @click="submitChangeClassState" size="mini" plain>确定</el-button>
              <el-button type="danger" @click="cancelChangeClassState" size="mini" plain>取消</el-button>
            </div>
          </el-col>
        </el-row>
      </div>
    </el-dialog>

    <el-dialog
      title="冲突课程信息"
      :visible.sync="showCTMessageDialog"
      width="1300px"
      class="xzzybc"
      >
      <div class="assessment-container" style="width: 100%;padding: 20px;">
          <div class="table-container" style="width: 100%;">
            <el-table
              :data="ctTableData"
              border
              class="table-data"
              row-class-name="row-class"
              cell-class-name="cell-class"
              header-row-class-name="header-row-class"
              header-cell-class-name="header-cell-class"
              style="height: 385px; overflow-y: auto"
            >
              <el-table-column
                prop="coursename"
                label="课程名称"
                align="center"
              >
              </el-table-column>
              <el-table-column
                prop="majorclass"
                label="专业班次"
                align="center"
              >
              </el-table-column>
              <el-table-column
                prop="teachtask"
                label="上课教员"
                align="center"
              >
              </el-table-column>
              <el-table-column
                prop="place"
                label="教学场地"
                width="130"
                align="center"
              >
              </el-table-column>
              <el-table-column
                prop="jc"
                label="上课节次"
                align="center"
              >
              </el-table-column>
            </el-table>
          </div>
        </div>
        <div class="btn-caozuo">
          <el-button type="warning" @click="showCTMessageDialog = false" size="mini" plain>确定</el-button>
          <el-button type="danger" @click="showCTMessageDialog = false" size="mini" plain>取消</el-button>
        </div>
    </el-dialog>

  </div>
</template>

<script>
import {
  bpksj_query_specialty,
  queryCommonPyccId,
  paike_courseList,
  queryCommonXueqi,
  queryCommonNj,
  paike_update_short,
  paike_index,
  paike_teacher_list,
  queryCommonDept,
  paike_get_ctzc,
  paike_saveAll,
  paike_update_paike,
  paike_delete_paike,
  specialtyclassinfo_detail,
  queryDefaultXueQi
} from "@/api/trainingManagement/place.js";
import selectClassRoom from "../elective/selectClassRoom.vue";
import recommendedSite from "./recommendedSite.vue";
export default {
  components: {
    selectClassRoom,
    recommendedSite
  },
  data() {
    return {
      paikeTitle: '',
      classZYBCName: "未设置",//场地名称
      ratedNumber: "0", //专业班次人数
      weekTextList:['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'], //星期名称列表
      schedueid: "",
      editType: "single", //修改信息类型
      replace_jxcd: false, // 教学场地
      replace_skjy: false, //上课教员
      replace_zy:false, //助教
      // jxcdMc: "",
      // jxcdMcId: "",
      skjyMc: "",
      skjyMcId: "",
      zyMc: "",
      zyMcId: "",
      majorName: '',
      paikeJcList:[],

      total1: 0, //总条数
      pageSize1: 50, //条数
      startPage1: 0, //开始条数
      endPage1: 0, //结束条数
      currentPage1: 1, //当前页数

      selectTreeRow: {}, //选中树节点
      treeData: [], //专业班次左侧数据
      showAddMessageDialog: false, //专业班次弹窗
      replaceTeacherDialog: false, //替换老师
      editTimeTableDialog: false, //编辑选中课表
      selectClassRoomDialog: false, //选择教学场地
      classRoom: "", //教学场地
      classTeacher: "", // 上课教员
      assistant: "", //助教
      courseLeader: "", //课程负责人
      courseLeaderList: [], //课程负责人列表
      currentSection1: "", //当前所选节次1
      currentSection2: "", //当前所选节次2
      currentSectionList: [{ label: "1", value: "1" },{ label: "2", value: "2" },{ label: "3", value: "3" },
      { label: "4", value: "4" },{ label: "5", value: "5" },{ label: "6", value: "6" },{ label: "7", value: "7" },{ label: "8", value: "8" },{ label: "9", value: "9" },{ label: "10", value: "10" }], //当前所选节次列表
      currentWeek1: "", //当前所选时间点应用到
      currentWeek2: "", //当前所选时间点应用到
      currentWeekList: [{ label: "1", value: "1" },{ label: "2", value: "2" },{ label: "3", value: "3" },
      { label: "4", value: "4" },{ label: "5", value: "5" },{ label: "6", value: "6" },{ label: "7", value: "7" },{ label: "8", value: "8" },{ label: "9", value: "9" },
      { label: "10", value: "10" },{ label: "11", value: "11" },{ label: "12", value: "12" },{ label: "13", value: "13" },
      { label: "14", value: "14" },{ label: "15", value: "15" },{ label: "16", value: "16" },
      { label: "17", value: "17" },{ label: "18", value: "18" },{ label: "19", value: "19" },{ label: "20", value: "20" }], //当前所选时间点应用列表
      scheduleWeekSelectList: [], //排课列表 -- 星期
      workOutScheduleDialog: false, //排课弹窗
      editShorterNameDialog: false, //修改简称弹窗
      selectWeekList: [
        {
          label: "第一周",
          value: "1",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第二周",
          value: "2",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第三周",
          value: "3",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第四周",
          value: "4",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第五周",
          value: "5",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第六周",
          value: "6",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第七周",
          value: "7",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第八周",
          value: "8",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第九周",
          value: "9",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第十周",
          value: "10",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第十一周",
          value: "11",
          checked: false,
          disabled: false, //是否可选
        },
        {
          label: "第十二周",
          value: "12",
          checked: false,
          disabled: false, //是否可选
        },
      ], //不排课周次列表
      editShorter: {}, //修改简称信息
      semester: "",
      semesterList: [{ label: "2021春", value: "2021春" }],
      kbms: "简单模式", //课表模式
      kbmsList: [
        { label: "简单模式", value: "简单模式" },
        { label: "复杂模式", value: "复杂模式" },
      ],
      grade: "", //年级
      gradeList: [{ label: "2021", value: "2021" }], //年级列表
      major: "", //专业
      majorList: [{ label: "2020波斯", value: "2020波斯" }], //专业班次
      startClassDate: "", //排课开始时间
      endClassDate: "", //排课结束时间
      showWeek: false, //显示周末
      classTable: [], //课程表格
      className: "", //课程名称
      courseLecturer: "", //教学课主讲
      courseLader: "", //课程负责人
      planHours: "", //计划学时
      scheduledHours: "", //已排学时
      classNumber: "", //上课人数
      jointClass: "", //合班上课专业班次
      selectJc: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //选择节次
      selectZC:[1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
      11, 12, 13, 14, 15, 16, 17, 18, 19, 20], //选择周次
      selectXq: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'], //星期列表
      // 日历数据
      calendarData: [],

      showPeopleDialogly: false, //选择教员
      // 校区列表
      jyData: [],
      selectTreeInfo: {}, //选中树节点
      defaultProps: {
        children: "children",
        label: "name",
      },
      selectList: [
        {
          type: "btn",
          name: "按姓名:",
          val: "",
        },
      ],
      tableData: [],
      tableData2: [],
      multipleSelection: [], //表格多选
      selectZybcList: [], //选中专业班次数据列表
      shortNameNew: "", //课程简称
      classSelectRow: {}, //选中课程行信息
      classRoomId: "", //教学场地id
      selectTuiJianRoomDialog: false, //推荐场地
      selectSKJY: [], //上课教员
      selectZJ: [], //助教
      teacherType: "", //教师类别
      kcfzrList: [], //课程负责人

      selectClassRow: {}, //选中行信息
      dedletedClassTeacherDialog: false, //删除
      courseNullData: {
            "id": "",
            "courseid": "",
            "courseno": "",
            "coursemonth": "",
            "courseweeks": "",
            "coursedate": "",
            "courseweek": "",
            "courseJc": "",
            "courseplace": "",
            "assistant": "",
            "teachtask": "",
            "courseper": "",
            "bkpk": false,
            "ctjyIds": [],
            "hbskIds": []
        },
        //
        ctTeacherInfo: {},
        ctTableData: [], //冲突
        showCTMessageDialog: false,
    };
  },
  mounted() {
    this.getDefaultXueQi();
    this.queryCommonXueqi();
    this.queryCommonDept();
  },
  methods: {
    async getDefaultXueQi(){
      queryDefaultXueQi().then(res=>{
        if(res.data.code == 200){
          this.semester = res.data.data
        }
      }).then(()=>{
        this.queryCommonNj();
      })
    },
    paikeCTTeacher(jc, tableData) {
      this.showCTMessageDialog = true;
      this.ctTableData = tableData;
      tableData.forEach(item => {
        item.jc = jc;
      })
      console.log(this.ctTableData, "ctTableData====")
    },
    replacePaikeTeacher() {
      // this.ctTableData = tableData;
      this.replaceTeacherDialog = false
    },
    handleReplaceTeacher(courseName, courseData) {
      this.ctTeacherInfo = {
        yuanKC: courseName,
        ctKC: courseData[0].coursename,
        teacher: courseData[0].teachtask
      }
      this.replaceTeacherDialog = true;
    },
    // 查询专业班次基础信息
    async queryZYBCData(zybcId) {
      const res = await specialtyclassinfo_detail(zybcId);
      if (res.data.code == 200) {
        this.classZYBCName = res.data.data.className;
        this.ratedNumber = res.data.data.ratedNumber;
      }
    },
    async saveEditSelectInfo() {
      var _this = this;
      var assistant = [];
      var assistantStr = "";
      var teachtask = [];
      var teachtaskStr = "";
      // var par = {
      //     "id": "",
      //     "courseplace": "",
      //     "assistant": "",
      //     "teachtask": ""
      // }
      var par = {};
      console.log('0000', this.replace_jxcd)
      console.log('1111', this.classRoomId)
      if (this.replace_jxcd) {
        if ( this.classRoomId == "" || this.classRoomId == null) {
          this.$message.warning("请先选择教学场地!");
          return;
        } else {
          par.courseplace = _this.classRoom;
        }
      }

      if (this.replace_skjy) {
        if (this.selectSKJY.length == 0) {
           this.$message.warning("请先选择主讲!");
          return;
        } else {
          this.selectSKJY.forEach(item => {
            console.log('-----------', this.selectSKJY)
            teachtask.push(item.bh);
          })
          teachtaskStr = teachtask.join(",");
          par.teachtask = teachtaskStr;
        }
      }

      if (this.replace_zy) {
        if (this.selectZJ.length == 0) {
           this.$message.warning("请先选择助教!");
          return;
        } else {
          this.selectZJ.forEach(item => {
            assistant.push(item.id);
          })
          assistantStr = assistant.join(",");
          par.assistant = assistantStr;
        }
      }

      if (this.editType == 'single') {
        par.id = this.selectClassRow.id;
        if((par.courseplace && par.courseplace != '') || (par.teachtask && par.teachtask != '') || (par.assistant && par.assistant != '')){
          const res = await paike_update_paike([par]);
          if (res.data.code == 200) {
            this.$message.success("信息修改成功!");
            this.cancelEditSelectInfo();
            this.applicationClass();
          }
        }else{
          this.$message.warning('请选择要替换的数据项目');
          return;
        }
      } else {
        console.log('----------执行--------')
        var newArr = [];
        var flag = false;
        console.log('00000000000', this.calendarData)
        this.calendarData.forEach(item => {
        if (item.ycList.length > 0) {
          item.ycList.forEach(item2 => {
            if (item2.zcList.length >0) {
              item2.zcList.forEach(item3 => {
                if (item3.jcList.length > 0) {
                  item3.jcList.forEach(item4 => {
                    // console.log('-----1111-----', item4)
                    // if (item4.id == "") {
                    //   flag = true;
                    //   // _this.$message.warning("请选择以进行排课的课程!");
                    //   // return
                    // }
                    if (item4.click && item4.id != '') {
                      // par.id = item4.id;
                      console.log('1111---', item4.id)
                      // var tmp = par;
                      // tmp.id = item4.id;
                      // tmp.courseplace = par.courseplace
                      // tmp.assistant = par.assistant
                      // tmp.teachtask = par.teachtask
                      // newArr.push(tmp);
                      newArr.push({
                        id: item4.id,
                        courseplace: par.courseplace,
                        assistant: par.assistant,
                        teachtask: par.teachtask
                      })
                    }
                  })
                }
              })
            }
          })
        }
      })
      if(newArr.length == 0) {
          this.$message.warning("请选择已进行排课的课程!");
          return
      }
      if(!this.replace_jxcd && !this.replace_skjy && !this.replace_zy){
        this.$message.warning('请勾选要替换的数据项')
        return
      }
      const res = await paike_update_paike(newArr);
      if (res.data.code == 200) {
        this.$message.success("信息修改成功!");
        this.cancelEditSelectInfo();
        this.applicationClass();
      }
      }
    },
    cancelEditSelectInfo() {
      this.editTimeTableDialog = false;
      this.selectZJ = [];
      this.selectSKJY = [];
      this.classRoom = "";
      this.classRoomId = "";
    },
    // 批量删除
    async removeSelectClass() {
      this.dedletedClassTeacherDialog = true;
    },

    async submitDeletedBatch() {
      var flag = false;
      var newArr = [];
      console.log(this.calendarData, "sssssssssss")
        this.calendarData.forEach(item => {
        if (item.ycList.length > 0) {
          item.ycList.forEach(item2 => {
            if (item2.zcList.length >0) {
              item2.zcList.forEach(item3 => {
                if (item3.jcList.length > 0) {
                  item3.jcList.forEach(item4 => {
                    if (item4.click) {
                      newArr.push(item4.id);
                    }
                  })
                }
              })
            }
          })
        }
      })
      if (newArr.length == 0) {
        this.$message.warning("请选择已进行排课的课程!");
        return
      }
      const res = await paike_delete_paike(newArr);
      if (res.data.code == 200) {
        this.dedletedClassTeacherDialog = false;
        this.$message.success("信息删除成功!");
        // this.replaceTeacherDialog = false;
        this.applicationClass();
      }
    },
    // 反选
    reserveAllData() {
      this.calendarData.forEach(item => {
        if (item.ycList.length > 0) {
          item.ycList.forEach(item2 => {
            if (item2.zcList.length >0) {
              item2.zcList.forEach(item3 => {
                if (item3.jcList.length > 0) {
                  item3.jcList.forEach(item4 => {
                    item4.click = !item4.click;
                  })
                }
              })
            }
          })
        }
      })
    },
    // 全选
    selectAllData() {
      this.calendarData.forEach(item => {
        if (item.ycList.length > 0) {
          item.ycList.forEach(item2 => {
            if (item2.zcList.length >0) {
              item2.zcList.forEach(item3 => {
                if (item3.jcList.length > 0) {
                  item3.jcList.forEach(item4 => {
                    item4.click = true;
                  })
                }
              })
            }
          })
        }
      })
    },
    // 取消选中
    cancelSelectAllData() {
      this.calendarData.forEach(item => {
        if (item.ycList.length > 0) {
          item.ycList.forEach(item2 => {
            if (item2.zcList.length >0) {
              item2.zcList.forEach(item3 => {
                if (item3.jcList.length > 0) {
                  item3.jcList.forEach(item4 => {
                    item4.click = false;
                  })
                }
              })
            }
          })
        }
      })
    },
    // 点击行信息
    clickInfo(row, index) {
      row.click = !row.click;
      if(row.click){
        this.paikeJcList.push(row.courseJc)
      }
    },
    // 获取冲突周次
    async getCTZCList() {
      // 节次
      var zcList = this.selectZC;
      var jcList =  this.selectJc;
      var xqList = this.selectXq;
      // if (this.currentSection1 != "" && this.currentSection1 != null
      // && this.currentSection2 != "" && this.currentSection2 != null) {
      //   let min = parseInt(this.currentSection1);
      //   let max = parseInt(this.currentSection2);
      //   if (min > max) {
      //     this.$message.warning("请选择正确的上课节次!");
      //     return;
      //   }
      //   let course = [];
      //   for (let i = min; i <= max; i++) {
      //     course.push(i);
      //   }
      //   jcList = course;
      // } else {
      //   this.$message.warning("请先选择节次!");
      // }

      // if (this.currentWeek1 != "" && this.currentWeek1 != null
      // && this.currentWeek2 != "" && this.currentWeek2 != null) {
      //   let min = parseInt(this.currentWeek1);
      //   let max = parseInt(this.currentWeek2);
      //   if (min > max) {
      //     this.$message.warning("请选择正确的上课周次!");
      //     return;
      //   }
      //   let course = [];
      //   for (let i = min; i <= max; i++) {
      //     course.push(i);
      //   }
      //   zcList = course;
      // } else {
      //   this.$message.warning("请先选择周次!");
      // }

      var data = {
        "zcList": zcList, // 选择的周次
        "xqList": xqList,  // 选择的星期
        "jcList": jcList, // 选择的节次
        "yearSpeciatyClassId": this.major,
        "courseno": this.classSelectRow.courseno,
        "xueqi": this.semester
      }
      const res = await paike_get_ctzc(data);
      if (res.data.code == 200) {
        var arr = res.data.data;
        this.selectWeekList.forEach(item => {
          item.disabled = false;
          arr.forEach(ele => {
            if (item.value == ele) {
              item.disabled = true;
            }
          })
        })
      }
    },
    // 数组去重
    arrSet(arr) {
      let obj = {};
      arr = arr.reduce((newArr, next) => {
        obj[next.id] ? "" : (obj[next.id] = true && newArr.push(next));
        return newArr;
      }, []);
      return arr;
    },
    submitSelectPeople() {
      if (this.tableData2.length > 0) {
        // 主讲
        if (this.teacherType == 'main') {
          this.selectSKJY = this.tableData2;
          var classTeacher = "";
          this.selectSKJY.forEach(item => {
            classTeacher += item.xm + ","
          })
          this.classTeacher = classTeacher;
        } else {
          // 助教
          this.selectZJ = this.tableData2;

          var assistant = "";
          this.selectZJ.forEach(item => {
            assistant += item.xm + ","
          })
          this.assistant = assistant;
        }
        var newArr = this.selectSKJY.concat(this.selectZJ);
        this.kcfzrList = this.arrSet(newArr);
        this.showPeopleDialogly = false;
        this.tableData2 = [];
      } else {
        this.$message.warning("请先选择教员！");
        return;
      }
    },
    handleTeacherNodeClick(node) {
      this.selectTreeInfo = node;
    },
    async queryCommonDept() {
      const res = await queryCommonDept();
      if (res.data.code == 200) {
        this.jyData = res.data.data;
        this.selectTreeInfo = res.data.data[0];
        this.queryTeacherList();
      }
    },
    // 获取教员
    async queryTeacherList() {
      // var gzbm = this.selectTreeInfo.id;
      var gzbm = '';
      var xm =  this.selectList[0].val;;
      const res = await paike_teacher_list(gzbm, xm);
      if (res.data.code == 200) {
        this.tableData = res.data.data.records;
      }
    },
    openJXCD() {
      this.editType = "select";
      this.selectClassRoomDialog = true;
    },

    // s删除推荐场地
    deletedPlace() {
      this.classRoom = "";
      this.classRoomId = "";
    },
    // 保存教学场地
    async savePlaceInfo(data) {
      if (data.length > 0) {
        if (data.length > 1) {
          this.$message.warning("请最多选择一个教学场地");
          return;
        } else {
          this.classRoom = data[0].cdmc;
          this.classRoomId = data[0].id;
          this.selectClassRoomDialog = false;
          this.selectTuiJianRoomDialog = false;
        }
      } else {
        this.$message.warning("请先选择教学场地");
        return;
      }
    },
    handleNodeClick(node) {
      this.selectTreeRow = node;
      this.queryZybcList()
    },
    cancelPlaceInfo() {
      this.selectClassRoomDialog = false;
      this.selectTuiJianRoomDialog = false;
    },
    // 查询排课课程列表
    async applicationClass() {
      if (
        this.startClassDate == "" ||
        this.startClassDate == null ||
        this.endClassDate == "" ||
        this.endClassDate == null
      ) {
        this.$message.warning("请先选择开始或结束日期");
        return;
      }
      console.log('-----222-----------', JSON.stringify(this.classSelectRow)==="{}")
      if (this.classSelectRow == undefined || JSON.stringify(this.classSelectRow)==="{}" || this.classSelectRow == null) {
        this.$message.warning("请先选择课程信息");
        return;
      }
      var data = {
        yearSpeciatyClassId: this.major,
        startTime: this.startClassDate,
        endTime: this.endClassDate,
        weekend: this.showWeek,
        courseno: this.classSelectRow.courseno,
        xueqi: this.semester,
        grade: this.grade
      };
      const result = await paike_index(data);
      if (result.data.code == 200) {
        let tempPaikeMonthArr = []
        result.data.data.forEach(item=>{
          tempPaikeMonthArr.push(Number(item.courseMonth))
        })
        tempPaikeMonthArr.sort((a, b) => {
          return a-b // 升序
        })
        let tempCalenData = []
        tempPaikeMonthArr.forEach(s=>{
          result.data.data.forEach(item=>{
            if(item.courseMonth == s){
              tempCalenData.push(item)
            }
          })
        })
        this.checkCalendarData(tempCalenData);
      }
    },
    // 日历数据格式整合
    checkCalendarData(calcendarData) {
      if (!this.showWeek) {
        this.weekTextList = ['星期一', '星期二', '星期三', '星期四', '星期五'];
      } else {
        this.weekTextList = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'];
      }
      var calData = calcendarData;
      for (let i = 0; i < calData.length; i++) {
        if (calData[i].ycList.length > 0) {
          for (let j = 0; j < calData[i].ycList.length; j++) {

            if (calData[i].ycList[j].zcList.length > 0) {
              for (let k = 0; k < calData[i].ycList[j].zcList.length; k++) {
                var dateOne = calData[i].ycList[j].zcList[k].courseDate;
                calData[i].ycList[j].zcList[k].date = dateOne.substring(8, 10);
                if (calData[i].ycList[j].zcList[k].jcList.length > 0) {
                  var newClassData = [];
                  var count = [];
                  var num = 0;
                  for (let p = 0; p<calData[i].ycList[j].zcList[k].jcList.length; p++) {
                    calData[i].ycList[j].zcList[k].jcList[p].idstr = JSON.parse(JSON.stringify(calData[i].ycList[j].zcList[k].jcList[p].id));
                  }
                  for (
                    let p = calData[i].ycList[j].zcList[k].jcList.length - 1;
                    p >= 0;
                    p--
                  ) {
                    calData[i].ycList[j].zcList[k].jcList[p].click = false;
                    if (p == calData[i].ycList[j].zcList[k].jcList.length - 1) {
                      newClassData.unshift(
                        calData[i].ycList[j].zcList[k].jcList[p]
                      );
                      count.unshift(1);
                      num++;
                    } else {
                      if (
                        calData[i].ycList[j].zcList[k].jcList[p].courseno == ""
                      ) {
                        // 允许排课
                        newClassData.unshift(
                          calData[i].ycList[j].zcList[k].jcList[p]
                        );
                        count.unshift(1);
                        num++;
                      } else {
                        // 判断课程编号和负责人是否相同，相同则进行合并
                        if (
                          calData[i].ycList[j].zcList[k].jcList[p].courseno ==
                            calData[i].ycList[j].zcList[k].jcList[p + 1]
                              .courseno &&
                          calData[i].ycList[j].zcList[k].jcList[p].courseper ==
                            calData[i].ycList[j].zcList[k].jcList[p + 1]
                              .courseper
                        ) {
                          count[0] += 1;
                          // 将合并课程的id拼接成字符串
                          var idTmp = calData[i].ycList[j].zcList[k].jcList[p].id;
                          var nId = calData[i].ycList[j].zcList[k].jcList[p + 1].idstr;
                          calData[i].ycList[j].zcList[k].jcList[p].idstr = JSON.parse(JSON.stringify(idTmp + "," + nId));
                          console.log(nId, "nId ====")
                          console.log(idTmp, "idTmp===")
                          console.log(calData[i].ycList[j].zcList[k].jcList[p].idstr, "calData[i].ycList[j].zcList[k].jcList[p].idstr ")
                        } else {
                          // 课程不相同
                          var tmp = JSON.parse(JSON.stringify(calData[i].ycList[j].zcList[k].jcList[p]));
                          newClassData.unshift(tmp);
                          console.log(newClassData, "newClass =====     ")
                          count.unshift(1);
                          num++;
                        }
                      }
                    }
                  }
                  // for (
                  //   let p = 1;
                  //   p < calData[i].ycList[j].zcList[k].jcList.length;
                  //   p++
                  // ) {
                  //   calData[i].ycList[j].zcList[k].jcList[p].click = false;
                  //   if (p == calData[i].ycList[j].zcList[k].jcList.length - 1) {
                  //     if (
                  //       calData[i].ycList[j].zcList[k].jcList[p].courseno == ""
                  //     ) {
                  //       // 允许排课
                  //       newClassData.push(
                  //         calData[i].ycList[j].zcList[k].jcList[p]
                  //       );
                  //       count.push(1);
                  //       num++;
                  //     } else {
                  //       // 判断课程编号和负责人是否相同，相同则进行合并
                  //       if (
                  //         calData[i].ycList[j].zcList[k].jcList[p].courseno ==
                  //           calData[i].ycList[j].zcList[k].jcList[p - 1]
                  //             .courseno &&
                  //         calData[i].ycList[j].zcList[k].jcList[p].courseper ==
                  //           calData[i].ycList[j].zcList[k].jcList[p - 1]
                  //             .courseper
                  //       ) {
                  //         count[num] += 1;
                  //         // 将合并课程的id拼接成字符串
                  //         var idTmp = calData[i].ycList[j].zcList[k].jcList[p].id;
                  //         var nId = calData[i].ycList[j].zcList[k].jcList[p - 1].idstr;
                  //         calData[i].ycList[j].zcList[k].jcList[p].idstr = JSON.parse(JSON.stringify(idTmp + "," + nId));

                  //         var tmp = JSON.parse(JSON.stringify(calData[i].ycList[j].zcList[k].jcList[p]));
                  //         newClassData.push(tmp);

                  //         console.log(nId, "nId ====")
                  //         console.log(idTmp, "idTmp===")
                  //         console.log(calData[i].ycList[j].zcList[k].jcList[p].idstr, "calData[i].ycList[j].zcList[k].jcList[p].idstr ")
                  //       } else {
                  //         // 课程不相同
                  //         var tmp = JSON.parse(JSON.stringify(calData[i].ycList[j].zcList[k].jcList[p]));
                  //         newClassData.push(tmp);
                  //         console.log(newClassData, "newClass =====     ")
                  //         count.push(1);
                  //         num++;
                  //       }
                  //     }

                  //     // newClassData.push(
                  //     //   calData[i].ycList[j].zcList[k].jcList[p]
                  //     // );
                  //     // count.push(1);
                  //     // num++;
                  //   } else {
                  //     if (
                  //       calData[i].ycList[j].zcList[k].jcList[p].courseno == ""
                  //     ) {
                  //       // 允许排课
                  //       newClassData.push(
                  //         calData[i].ycList[j].zcList[k].jcList[p]
                  //       );
                  //       count.push(1);
                  //       num++;
                  //     } else {
                  //       // 判断课程编号和负责人是否相同，相同则进行合并
                  //       if (
                  //         calData[i].ycList[j].zcList[k].jcList[p].courseno ==
                  //           calData[i].ycList[j].zcList[k].jcList[p - 1]
                  //             .courseno &&
                  //         calData[i].ycList[j].zcList[k].jcList[p].courseper ==
                  //           calData[i].ycList[j].zcList[k].jcList[p - 1]
                  //             .courseper
                  //       ) {
                  //         debugger
                  //         count[0] += 1;
                  //         // 将合并课程的id拼接成字符串
                  //         var idTmp = calData[i].ycList[j].zcList[k].jcList[p].id;
                  //         var nId = calData[i].ycList[j].zcList[k].jcList[p - 1].idstr;
                  //         calData[i].ycList[j].zcList[k].jcList[p].idstr = JSON.parse(JSON.stringify(idTmp + "," + nId));
                  //         console.log(nId, "nId ====")
                  //         console.log(idTmp, "idTmp===")
                  //         console.log(calData[i].ycList[j].zcList[k].jcList[p].idstr, "calData[i].ycList[j].zcList[k].jcList[p].idstr ")
                  //       } else {
                  //         // 课程不相同
                  //         var tmp = JSON.parse(JSON.stringify(calData[i].ycList[j].zcList[k].jcList[p]));
                  //         newClassData.push(tmp);
                  //         console.log(newClassData, "newClass =====     ")
                  //         count.push(1);
                  //         num++;
                  //       }
                  //     }
                  //   }
                  // }
                  for (let z = 0; z < newClassData.length; z++) {
                    newClassData[z].col = count[z];
                  }
                  calData[i].ycList[j].zcList[k].jcList = JSON.parse(
                    JSON.stringify(newClassData)
                  );
                }
              }
            }
          }
        }
      }
      // 课程填充 如果课程不是从周一开始排课，返回的数据只有从当前日期往后的课程，需要自动填补未空白课程
      // if (!this.showWeek) {
      //   for(var ii =0; ii<calData.length; ii++) {
      //     if (calData[0].ycList.length > 0) {
      //       var length = calData[0].ycList[0].zcList.length;
      //       if(length==5) {
      //         // 不进行处理
      //       } else {
      //         var count = 5 - parseInt(length);
      //         for (var num = 0;num<count;num++) {
      //           calData[0].ycList[0].zcList.unshift({
      //               "courseDate": "",
      //               "courseMonth": "",
      //               "courseWeeks": 0,
      //               "courseWeek": "",
      //               "jcList": [
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "1",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "2",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "3",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "4",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "5",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "6",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "7",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "8",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "9",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "10",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   }
      //               ]
      //           })
      //         }
      //         // unshift 插入数组
      //       }
      //     }
      //   }
      // } else {
      //   if (calData[0].ycList.length > 0) {
      //       var length = calData[0].ycList[0].zcList.length;
      //       if(length==7) {
      //         // 不进行处理
      //       } else {
      //         var count = 7 - parseInt(length);
      //         for (var num = 0;num<count;num++) {
      //           calData[0].ycList[0].zcList.unshift({
      //               "courseDate": "",
      //               "courseMonth": "",
      //               "courseWeeks": 0,
      //               "courseWeek": "",
      //               "jcList": [
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "1",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "2",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "3",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "4",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "5",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "6",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "7",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "8",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "9",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   },
      //                   {
      //                       "id": "",
      //                       "courseid": "",
      //                       "courseName": "",
      //                       "courseno": "",
      //                       "coursemonth": "",
      //                       "courseweeks": -1,
      //                       "courseweeksStr": "",
      //                       "coursedate": "",
      //                       "courseweek": "星期一",
      //                       "courseJc": "10",
      //                       "courseplace": "",
      //                       "assistant": "",
      //                       "teachtask": "",
      //                       "courseper": "",
      //                       "courseClass": "",
      //                       "zybc": "",
      //                       "bkpk": false,
      //                       "bpkzc": [],
      //                       "ctjyIds": [],
      //                       "hbskIds": [],
      //                       "pkct": false
      //                   }
      //               ]
      //           })
      //         }
      //         // unshift 插入数组
      //       }
      //     }
      // }
      this.calendarData = calData;
      console.log(this.weekTextList, "weekTextList ==== ")
      console.log(calData, "calData===========");
    },
    renderHeader(h) {
      return (
        <div style="height:30px">
          <span>已选的人员列表</span>
          <el-button
            icon="el-icon-delete"
            class="basic-button red-button"
            style="padding: 7px 10px;position: absolute;right: 50px;color: #ff3819;border: 1px solid #ff3819;background: #ffefef;border-radius: 8px;"
            onClick={() => this.deletedAll()}
          >
            全部删除
          </el-button>
        </div>
      );
    },
    // 获取年级列表
    async queryCommonNj() {
      const res = await queryCommonNj("");
      if (res.data.code == 200) {
        this.gradeList = res.data.data;
        this.grade = this.gradeList[0].id;
      }
    },
    // 获取学期列表
    async queryCommonXueqi() {
      const res = await queryCommonXueqi();
      if (res.data.code == 200) {
        this.semesterList = res.data.data;
        // this.semester = this.semesterList[0].id;
      }
    },
    // 查询课程列表数据
    async queryPaikeListClass() {
      if (this.major == "" || this.major == null) {
        this.$message.warning("请先选择专业班次!");
        return;
      }
      var data = {
        xueqi: this.semester,
        nj: this.grade,
        yearSpeciatyClassId: this.major,
      };
      const res = await paike_courseList(data);
      if (res.data.code == 200) {
        this.classTable = res.data.data;
      }
    },
    resetAll(){
      this.majorName = '';
      this.selectZybcList = []
    },
    resetAllTime(){
      this.startClassDate = '';
      this.endClassDate = ''
    },
    cancelChangeClassState() {
      this.selectZybcList = [];
      this.showAddMessageDialog = false;
    },
    handleZYBCSelectionChange(val) {
      this.selectZybcList = val;
    },
    // 选中专业班次
    async submitChangeClassState() {
      if (this.selectZybcList.length > 0) {
        if (this.selectZybcList.length > 1) {
          this.$message.warning("最多选择一条专业班次数据!");
          return;
        } else {
          this.major = this.selectZybcList[0].id;
          this.majorName = this.selectZybcList[0].className;
          this.showAddMessageDialog = false;
          this.queryZYBCData(this.major);
        }
      } else {
        this.$message.warning("请选择一条专业班次!");
        return;
      }
    },
    // 选中专业班次
    selectZYBC() {
      this.showAddMessageDialog = true;
      this.queryCommonPycc();
    },
    async queryCommonPycc() {
      const res = await queryCommonPyccId();
      if (res.data.code == 200) {
        this.treeData = res.data.data;
        this.selectTreeRow = this.treeData[0];
        this.queryZybcList();
      }
    },
    // 查询专业班次数据列表
    async queryZybcList() {
      // var trainingLevel = this.selectTreeRow.id;
      var trainingLevel = this.selectTreeRow.id || '';
      // var year = this.selectList[0].val;
      var year = "";
      var yearSpecialtyId = "";
      var current = this.currentPage1;
      var size = this.pageSize1;
      const res = await bpksj_query_specialty(
        trainingLevel,
        year,
        yearSpecialtyId,
        current,
        size
      );
      if (res.data.code == 200) {
        this.majorTableData = res.data.data.records;
        this.total1 = res.data.data.total;
        var length = this.majorTableData.length;
        this.calculatePage1(this.pageSize1, res.data.data.current, length);
      }
    },
    // 计算开始和结束条数
    calculatePage1(pageSize, current, length) {
      if (current == 1) {
        if (length != 0) {
          this.startPage1 = 1;
          this.endPage1 = length;
        }
      } else {
        this.startPage1 = pageSize * (current - 1) + 1;
        this.endPage1 = parseInt(this.startPage1) + parseInt(length) - 1;
      }
    },
    handleDialogCurrentChange() {
      this.currentPage1 = val;
      this.queryZybcList();
    },
    // 推荐教学场地
    tjjxcdInfo() {
      this.selectTuiJianRoomDialog = true;
    },

    // 信息查询
    queryInfo() {},
    // 表格选择事件
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    transferData() {
      for (var i = 0; i < this.tableData.length; i++) {
        var isFlag = false;
        for (var j = 0; j < this.multipleSelection.length; j++) {
          if (
            this.tableData[i].id == this.multipleSelection[j].id
          ) {
            isFlag = true;
            break;
          }
        }
        if (isFlag) {
          this.tableData.splice(i, 1);
          i--;
        }
      }
      this.multipleSelection.forEach((item) => {
        this.tableData2.push(item);
      });
    },
    // 选择列表信息全部删除
    deletedAll() {
      this.$message.success("删除成功");
      this.tableData2.forEach((item) => {
        this.tableData.push(item);
      });
      this.tableData2 = [];
    },
    // 删除行信息
    deleteRow(row, index) {
      this.tableData.push(row);
      this.tableData2.splice(index, 1);
    },
    // 主教主讲人员编辑
    editInfo() {
      this.teacherType = 'main'; //主讲
      this.showPeopleDialogly = true;
      this.queryTeacherList();
    },
    deleteJy(){
      this.selectSKJY = []
      this.classTeacher = ''
    },
    // 助教人员选择
    editZhuJiaoInfo() {
      this.teacherType = 'zhujiao'; //主讲
      this.showPeopleDialogly = true;
      this.queryTeacherList();
    },
    deleteZy(){
      this.selectZJ = []
      this.assistant = ''
    },
    // 修改简称弹窗
    editRowInfo(row) {
      console.log(row, "11111111111")
      this.editShorterNameDialog = true;
      this.editShorter = row;
      this.editShorter.primaryShorter = row.shortname; //原课程简称
      this.editShorter.classRoom = row.jys; //教学班名称
      this.shortNameNew = row.shortname; //现课程简称
    },
    // 课程简称保存
    async saveShorterNameData() {
      var data = {
        schedueid: this.editShorter.schedueid, //排课编号
        shortname: this.shortNameNew, //简称
      };
      const res = await paike_update_short(data);
      if (res.data.code == 200) {
        this.$message.success("课程简称修改成功!");
        this.editShorterNameDialog = false;
        this.queryPaikeListClass();
      }
    },
    // 点击课程表格行信息
    rowClick(row) {
      this.schedueid = row.schedueid;
      this.classSelectRow = row;
      // 课程负责人绑定
      this.courseLeader = row.coursecharge;
    },
    // 排课弹窗
    handleClickWorkOutSchedule(jc, zc, day) {
      console.log('-------------------------'+ jc)
      // this.selectJc = [jc];
      // this.selectZC = [zc]
      // console.log('===', jc)
      // console.log('===', zc)
      // console.log('===', day)
      let paikeJcArray = Array.from(new Set(this.paikeJcList))
      let tempJcStrArr = []
      if(paikeJcArray.length == 1){
        for(let i=0; i<paikeJcArray[0]; i++){
          tempJcStrArr.push(i+1);
        }
        this.paikeTitle = tempJcStrArr.toString() + '节排课'
      }else{
        let minJc =  Math.min(...paikeJcArray);
        let maxJc = Math.max(...paikeJcArray)
        for(let i=0; i<maxJc-minJc; i++){
          tempJcStrArr.push(minJc+i)
        }
        tempJcStrArr.push(jc)
      }
      this.paikeTitle = tempJcStrArr.toString() + '节排课'
      this.paikeJcList = []
      this.workOutScheduleDialog = true;
      this.getCTZCList();
    },
    editMoreTimetable() {
      this.editType = "more";
      this.replace_jxcd = false;
      this.replace_skjy = false;
      this.replace_zy = false;
      this.classRoom = '';
      this.selectSKJY = []
      this.selectZJ = []
      this.editTimeTableDialog = true;
    },
    // 编辑选中课表
    editTimetable(row) {
      console.log('===选中课程表格行绑定数据====')
      this.editType = "single";
      this.selectClassRow = row; //选中行信息

      this.replace_jxcd = false;
      this.replace_skjy = false;
      this.replace_zy = false;
      this.classRoom = this.selectClassRow.coursePlaceStr
      this.selectSKJY = []
      this.selectSKJY.push({
        id:this.selectClassRow.teachtask,
        xm:this.selectClassRow.teaherTaskStr
      })
      this.selectZJ = []
      this.selectZJ.push({
        id:this.selectClassRow.assistant,
        xm:this.selectClassRow.assistantStr
      })

      this.editTimeTableDialog = true;
    },
    // 取消课程排课
    cancelClassInfo() {
      this.classRoom = "";
      this.classRoomId = "";
      this.classTeacher = "";
      this.selectSKJY = [];
      this.assistant = "";
      this.selectZJ = [];
      this.courseLeader = "";
      this.scheduleWeekSelectList = [];
      this.currentSection1= "";
      this.currentSection2 = "";
      this.currentWeek1 = "";
      this.currentWeek2 = "";
      this.selectWeekList.forEach(item => {
        item.checked = false;
      })
      this.workOutScheduleDialog = false
    },
    // 课表提交
    async submitClassInfo() {
      var zcList = [];
      if (this.currentWeek1 != "" && this.currentWeek1 != null
      && this.currentWeek2 != "" && this.currentWeek2 != null) {
        let min = parseInt(this.currentWeek1);
        let max = parseInt(this.currentWeek2);
        if (min > max) {
          this.$message.warning("请选择正确的上课周次!");
          return;
        }
        let course = [];
        for (let i = min; i <= max; i++) {
          course.push(i);
        }
        zcList = course;
      } else {
        this.$message.warning("请先选择周次!");
        return
      }

      var jcList = [];
      if (this.currentSection1 != "" && this.currentSection1 != null
      && this.currentSection2 != "" && this.currentSection2 != null) {
        let min = parseInt(this.currentSection1);
        let max = parseInt(this.currentSection2);
        if (min > max) {
          this.$message.warning("请选择正确的上课节次!");
          return;
        }
        let course = [];
        for (let i = min; i <= max; i++) {
          course.push(i);
        }
        jcList = course;
      } else {
        this.$message.warning("请先选择节次!");
        return
      }

      if (this.courseLeader == "" || this.courseLeader == null) {
        this.$message.warning("请先选择课程负责人")
        return
      }

      var jyList = [];
      if (this.selectSKJY.length == 0) {
        this.$message.warning("请先选择教员!");
        return
      } else {
        this.selectSKJY.forEach(item => {
          jyList.push(item.id);
        })
      }

      var zjList = [];
      if (this.selectZJ.length == 0) {
        this.$message.warning("请先选择助教!");
        return
      } else {
        this.selectZJ.forEach(item => {
          zjList.push(item.id);
        })
      }

      var data = {
        "zcList": zcList, // 周次
        "xqList": this.scheduleWeekSelectList,
        "jcList": jcList,
        "fzr": this.courseLeader,
        "zjList": zjList,
        "jyList": jyList,
        "kcId": "",
        "coursePlace": this.classRoomId,
        "yearSpeciatyClassId": this.major,
        "startTime": this.startClassDate,
        "endTime": this.endClassDate,
        "weekend": this.showWeek,
        "courseno": this.classSelectRow.courseno,
        "xueqi":this.semester,
        "schedueid": this.schedueid,
        "grade": this.grade
      }
      const res = await paike_saveAll(data);
      if (res.data.code == 200) {
        if (res.data.data.result) {
          this.$message.success("课程添加成功!");
          this.applicationClass();
        } else {
          this.$message.warning("新增排课中有冲突课程!");
          this.checkCalendarData(res.data.data.list);
        }
        this.workOutScheduleDialog = false
      }
    },
    // 查询专业班次课表
    toViewZYBCClass() {
      this.$router.push({
        path: "/admin/course/professionalScheduleQueryMain",
        query: {
          xueqi: this.semester,
          zybc: this.major,
          zybcMc: this.majorName
        }
      })
    },
    // 删除教学场地
    deletedJXCD() {
      this.classRoom = "";
      this.classRoomId = "";
    },
    // 删除上课教员
    deletedSKJY() {
      this.selectSKJY = [];
    },
    // 删除助教
    deletedZJ() {
      this.selectZJ = [];
    }
  },
};
</script>

<style scoped lang="less">
.manual-entry-container {
  > div:nth-child(1) {
    width: calc(100% - 20px);
    border: 1px solid rgba(0, 76, 167, 0.8);
    border-radius: 6px;
    margin: 10px;
    ul {
      list-style: none;
      li {
        border-bottom: 1px solid rgba(0, 76, 167, 0.4);
        height: auto;
        > span {
          box-sizing: border-box;
          display: inline-block;
          font-size: 14px;
          color: rgba(0, 76, 167, 1);
          padding-left: 54px;
          border-right: 1px solid rgba(0, 76, 167, 0.4);
          height: 60px;
          padding-top: 20px;
          vertical-align: middle;
          &:nth-child(n) {
            width: 15%;
          }
          &:nth-child(2n) {
            width: 15%;
          }
          &:last-child {
            border-right: none;
          }
          &.active {
            font-size: 16px;
            color: rgba(0, 76, 167, 1);
            font-weight: bold;
            background: rgba(77, 129, 192, 0.1);
            text-align: center;
            padding-left: 0;
          }
          &.active {
              text-align: left;
              padding-left: 20px;
            }
          > span {
            color: rgba(255, 56, 25, 1);
          }
          &.fill {
            width: 100%;
            text-align: left;
            padding-left: 25px;
          }
        }
      }
      &:nth-child(1) {
        li {
          > span {
            height: 60px;
          }
        }
      }
      &:nth-child(3) {
        li {
          border-bottom: 1px solid rgba(0, 76, 167, 0.4);
          > span {
            width: 400px;
            text-align: center;
            padding-left: 0;
            height: 60px;
            &:nth-child(1) {
              width: 144px;
            }
            &:nth-child(2) {
              width: 180px;
            }
            &:nth-child(3) {
              width: 289px;
            }
            &:nth-child(4) {
              width: 196px;
            }
            &:nth-child(5) {
              width: 197px;
            }
            &:nth-child(6) {
              width: 197px;
            }
            &:nth-child(7) {
              width: 198px;
              padding-top: 8px !important;
              > span {
                display: inline-block;
                width: 121px;
                height: 28px;
                border: 1px solid #5230e9;
                background: rgba(235, 230, 255, 1);
                opacity: 1;
                border-radius: 4px;
                font-size: 14px;
                font-weight: 400;
                color: #5230e9;
                line-height: 18px;
                margin-top: 8px;
                padding: 5px 10px;
                cursor: pointer;
              }
            }
            &:nth-child(8) {
              width: 150px;
            }
            &:nth-child(9) {
              width: 182px;
            }
            &.active {
              border-top: 1px solid rgba(0, 76, 167, 0.4);
              height: 73px;
              padding-top: 25px;
            }
          }
          &:nth-child(2) {
            > div {
              height: 57px;
              padding: 18px 30px;
              > span {
                &:nth-child(1) {
                  font-size: 16px;
                  font-weight: bold;
                  color: #004ca7;
                }
                &:nth-child(2) {
                  font-size: 14px;
                  color: #004ca7;
                }
              }
            }
          }
        }
      }
      .select-week-list {
        display: flex;
        width: 100%;
        align-items: center;
        flex-wrap: wrap;

        .week-item {
          width: 25%;
          height: 60px;
          display: flex;
          color: #004ca7;
          .checked {
            width: 80px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-right: 1px solid rgba(0, 76, 167, 0.4);
            border-bottom: 1px solid rgba(0, 76, 167, 0.4);
          }
          .content {
            width: 180px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-right: 1px solid rgba(0, 76, 167, 0.4);
            border-bottom: 1px solid rgba(0, 76, 167, 0.4);
          }
        }
        .week-item:nth-child(4n) {
          .checked {
            border-right: 0;
          }
          .content {
            border-right: 0;
          }
        }
        .week-item:nth-last-child(1) {
          .checked {
            border-bottom: 0;
          }
          .content {
            border-bottom: 0;
          }
        }
        .week-item:nth-last-child(2) {
          .checked {
            border-bottom: 0;
          }
          .content {
            border-bottom: 0;
          }
        }
        .week-item:nth-last-child(3) {
          .checked {
            border-bottom: 0;
          }
          .content {
            border-bottom: 0;
          }
        }
        .week-item:nth-last-child(4) {
          .checked {
            border-bottom: 0;
          }
          .content {
            border-bottom: 0;
          }
        }
      }
    }
    > div {
      padding: 14px 83px;
      height: 78px;
      > div:nth-child(1) {
        font-size: 16px;
        font-weight: bold;
        color: #004ca7;
        margin-bottom: 10px;
      }
      > div:nth-child(2) {
        > span {
          font-size: 14px;
          color: rgba(0, 76, 167, 1);
          margin-right: 57px;
          > span {
            color: rgba(255, 56, 25, 1);
          }
        }
      }
    }
  }
  > div:nth-child(2) {
    width: calc(100% - 20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 10px;
    color: #004ca7;
  }
  > div:nth-child(3) {
    width: calc(100% - 20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px;
    border: 1px solid rgba(0, 76, 167, 0.8);
    border-radius: 6px;
    overflow: auto;
    .calendar-title {
      list-style: none;
      height: 765px;
      .calendar-title-top {
        border-bottom: 1px solid rgba(0, 76, 167, 0.4);
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        .top {
          display: inline-block;
          font-size: 14px;
          color: #004ca7;
          border-right: 1px solid rgba(0, 76, 167, 0.4);
          height: 120px;
          min-width: 60px;
          display: flex;
          align-items: center;
          justify-content: center;
          .week {
            list-style: none;
            height: 120px;
            width: 660px;
            overflow: hidden;
            > div {
              // border-bottom: 1px solid rgba(0, 76, 167, 0.4);
              height: auto;
              display: flex;
              align-items: center;
              justify-content: center;
              height: 60px;
              width: 660px;
              > div {
                display: inline-block;
                font-size: 14px;
                color: #004ca7;
                border-right: 1px solid rgba(0, 76, 167, 0.4);
                height: 60px;
                width: 60px;
                display: flex;
                align-items: center;
                justify-content: center;
              }
              > div:nth-last-child(1) {
                display: inline-block;
                font-size: 14px;
                color: #004ca7;
                height: 60px;
                width: 60px;
                display: flex;
                align-items: center;
                justify-content: center;
                border-right: 0;
              }
            }

            .border-bottom {
              border-bottom: 1px solid rgba(0, 76, 167, 0.4);
            }
          }
        }
        .wth-660 {
          width: 660px;
        }
      }

      .calendar-content {
        display: flex;
        .month {
          width: 60px;
          display: flex;
          align-items: center;
          justify-content: center;
          border-bottom: 1px solid rgba(0, 76, 167, 0.4);
          border-right: 1px solid rgba(0, 76, 167, 0.4);
        }
        .week-times {
          .week-time-item {
            width: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-bottom: 1px solid rgba(0, 76, 167, 0.4);
            border-right: 1px solid rgba(0, 76, 167, 0.4);
            height: 101px;
          }
        }
        .days {
          .day-times {
            display: flex;
            .day-time-item {
              width: 60px;
              display: flex;
              align-items: center;
              justify-content: center;
              // border-bottom: 1px solid rgba(0, 76, 167, 0.4);
              border-right: 1px solid rgba(0, 76, 167, 0.4);
              height: 100px;

              .allow {
                width: 100%;
                height: 100%;
                cursor: pointer;
              }
            }
          }
        }
      }
    }
  }
  .button-group {
    text-align: center;
    margin-top: 36px;
    > div {
      display: inline-block;
      padding: 6px 20px;
      background: rgba(255, 246, 239, 1);
      border: 1px solid rgba(243, 184, 21, 1);
      border-radius: 4px;
      font-size: 18px;
      font-weight: 400;
      color: rgba(243, 184, 21, 1);
      text-align: center;
    }
  }
}
.red-cirle {
  width: 25px;
  height: 25px;
  background: #f78989;
  border-radius: 12px;
  cursor: pointer;
}

.green-block {
  width: 25px;
  height: 25px;
  background: #02c86c94;
  cursor: pointer;
}

.blue-block {
  width: 25px;
  height: 25px;
  background: #7fc6ff;
  cursor: pointer;
}

.red-block {
  width: 25px;
  height: 25px;
  background: #f78989;
  cursor: pointer;
}
.edit-icon {
  font-size: 20px;
  color: #02c86c;
  margin-left: 10px;
  cursor: pointer;
}

.del-icon {
  color: #ff492e;
  font-size: 20px;
  margin-left: 10px;
  cursor: pointer;
}

/deep/ .xzjy .el-dialog__body {
  padding: 0 !important;
  .wrapper-container {
    width: 100% !important;
  }
  .wrapper-container .search-container .search-container-left {
    margin-left: 20px;
    flex-wrap: wrap;
    .search-container-item {
      width: 200px;
      margin-right: 10px;
      .box {
        > span {
          text-align: left;
          width: 80px;
        }
        display: flex;
        justify-content: space-evenly;
        margin-bottom: 20px;
        align-items: center;
        .el-input--medium .el-input__inner {
          height: 28px;
        }
      }
    }
  }
}

/deep/ .xuanzejiaoyuan .el-dialog__body {
  padding: 0 !important;
  .wrapper-container {
    width: 100% !important;
    color: #004ca7;
  }
  .wrapper-container .search-container .search-container-left {
    margin-left: 20px;
    flex-wrap: wrap;
    .search-container-item {
      width: 200px;
      margin-right: 10px;
      .box {
        > span {
          text-align: left;
          width: 80px;
        }
        display: flex;
        justify-content: space-evenly;
        margin-bottom: 20px;
        align-items: center;
        /deep/.el-input__inner {
          height: 28px;
        }
      }
    }
  }
}

.query-btn {
  margin-top: 15px;
  /deep/ .el-input__inner {
    height: 28px;
  }
}
/deep/ .el-tree-node__expand-icon.expanded {
  color: rgb(0, 76, 167);
}

.xzjy .tree {
  padding: 30px;
  color: rgb(0, 76, 167);
}

.assessment-container {
  // width: calc(100% - 40px);
  // margin: 20px;
  // margin-top: 0;
  width: calc(100% - 20px);
  margin: 10px;
  margin-top: 0;
  /deep/ .table-container {
    width: 100% !important;
    .el-table td,
    .el-table th.is-leaf,
    .el-table--border,
    .el-table--group {
      border-color: #c7d7eb;
    }

    .el-table__header tr,
    .el-table__header th {
      padding: 0;
      height: 76px;
      background-color: #edf2f9;
      font-size: 16px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 20px;
      color: #004ca7;
    }

    .el-table__body tr,
    .el-table__body td {
      padding: 0;
      height: 86px;
    }

    .wrapper-button {
      display: flex;
      flex-direction: column;
      align-items: center;

      > div {
        margin-bottom: 8px;
      }
    }
    .table-data {
      width: 100%;
      border: 0.8px solid #004ca7;
      border-radius: 9px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #004ca7;
    }
  }
}

.arrow-right-postion {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 600px;
}

.arrow-right-postion .btn {
  width: 60px;
  height: 60px;
  background: #004ca7;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.arrow-right-postion .btn > i {
  font-size: 30px;
  font-weight: bold;
  color: #fff;
}
.search-button {
  width: 77px;
  height: 28px;
  line-height: 28px;
  background: #f1f8fe;
  border: 1px solid #51aef6;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  > span {
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #51aef6;
  }
  > img {
    width: 20px;
    height: 20px;
    margin-right: 4px;
  }
}

.border-all {
  margin: 10px;
  border: 1px solid #004ca7;
  color: #004ca7;
  border-radius: 5px;
}

.query-item {
  margin: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  .text {
    width: 80px;
  }

  .select {
    width: 130px;
  }
}

.query-text {
  margin: 10px 32px;
  display: flex;
  align-items: center;
}

.flex-margin {
  display: flex;
  align-items: center;
  margin: 15px;
}

.lock {
  font-size: 20px;
  color: #ff492e;
}

.un-lock {
  font-size: 20px;
  color: #02c86c;
}

.short {
  color: #ff492e;
}

.dialog-footer {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 350px;
  margin: 0 auto;
}
.dialog-input {
  display: flex;
  align-items: center;

  /deep/ .el-input {
    width: 250px;
  }

  /deep/ .el-input__inner {
    height: 28px;
  }
}
.undeLine {
  text-decoration: underline;
  cursor: pointer;
  color: #004ca7;
}

.class-tip {
  color: #004ca7;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin: 40px;
}

.paike {
  /deep/ .el-dialog {
    height: 920px;
  }
}

.xuanzejiaoyuan {
  /deep/ .el-dialog {
    height: 900px;
  }
}

.tishi {
  /deep/ .el-dialog {
    height: 320px;
  }
}
.zybc-select {
  width: 130px;
  height: 28px;
  border: 1px solid;
  border-radius: 5px;
  cursor: pointer;
  padding-left: 10px;
  font-size: 14px;
  padding-top: 3px;
}

.xzzybc {
  /deep/ .el-dialog {
    height: 720px;
  }
}

.wrapper-container .search-container .search-container-left {
  width: 100%;
  flex-wrap: wrap;
  .search-container-item {
    width: 12%;
    margin-right: 0px;
    .box {
      > span {
        text-align: left;
      }
      display: flex;
      justify-content: space-evenly;
      margin-bottom: 20px;
      align-items: center;
    }
  }
}

.bottom-block {
  // display: flex;
  flex-direction: row;
  justify-content: space-between !important;
  .export-button {
    width: 127px;
    height: 27px;
    background: #fff6ef;
    border: 1px solid #f3b815;
    border-radius: 4px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    > img {
      width: 17px;
      height: 17px;
    }
    > span {
      margin-left: 12px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #f3b815;
    }
  }
  .text {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    line-height: 39px;
    color: #004ca7;
  }
}
</style>

<style lang="less" scoped>
@import "../../../../styles/text.less";
.pagination-block {
  margin-top: 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.btn-caozuo {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 800px;
  margin: 0 auto;
  padding-top: 25px;
}

.border-left {
  border-left: 1px solid #004ca7;
}

.xuanze_jxcd {
  /deep/ .el-dialog {
    height: 900px;
  }
}

.paike-tip {
  display: flex;
  width: 200px;
  align-items: center;
  justify-content: space-between;
}

.xgjc {
  /deep/ .el-input__inner {
    height: 28px;
  }
}
.class-active {
  background: rgba(77, 129, 192, 0.1);
}

.copy-input {
  height: 28px;
  width: 250px;
  border: 1px solid;
  border-radius: 5px;
  cursor: pointer;
  overflow: hidden;
  > span {
    padding: 0 10px;
  }
}

.empty-cell {
  width: 660px;
  height: 100px;
  // border-bottom: 1px solid rgba(0, 76, 167, 0.4);
  border-right: 1px solid rgba(0, 76, 167, 0.4);
}
</style>

<style lang="less" scoped>
  #work-out-schedule-teaching{
    /deep/ .el-button--warning.is-plain{
      background: #FFF6EF;
      border-color: #F3B815;
      color: #F3B815;
      border-radius: 6px;
    }
    /deep/ .el-button--warning.is-plain:focus, .el-button--warning.is-plain:hover{
      color: #F3B815;
      background: #FFF6EF;
      border: 1px solid #F3B815;
      border-radius: 6px;
    }

    /deep/ .el-button--success.is-plain{
      background: #F1FFF8;
      border-color: #02C86C;
      color: #02C86C;
      border-radius: 6px;
    }
    /deep/ .el-button--success.is-plain:hover{
      background: #F1FFF8;
      border: 1px solid #02C86C;
      color: #02C86C;
      border-radius: 6px;
    }

    /deep/ .el-button--primary.is-plain{
      background: #F1F8FE;
      border-color: #51AEF6;
      color: #51AEF6;
      border-radius: 6px;
    }

    /deep/ .el-button--primary.is-plain:hover{
      background: #F1F8FE;
      border: 1px solid #51AEF6;
      color: #51AEF6;
      border-radius: 6px;
    }

    /deep/ .el-button--danger.is-plain{
      background: #FFEFEF;
      border-color: #FF3819;
      color: #FF3819;
      border-radius: 6px;
    }

    /deep/ .el-button--danger.is-plain:hover{
      background: #FFEFEF;
      border: 1px solid #FF3819;
      color: #FF3819;
      border-radius: 6px;
    }
  }
</style>
